/**
 * 
 */
package com.wsd.sys;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import com.wsd.util.WebApplicationContextUtils;



/**
 * @author 小e
 *
 * 2010-1-14 上午03:32:54
 */
public class InitFilter implements Filter {

	
	public void destroy() {
		// TODO Auto-generated method stub
		
	}

	
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		// TODO Auto-generated method stub
		
	}


	public void init(FilterConfig filterConfig) throws ServletException {
		ServletContext sc = filterConfig.getServletContext();
		String path = sc.getRealPath("/");
		System.out.println(path);
		WebApplicationContextUtils.setServletContext(sc);
		
	}

}
